# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Laurent Carlier <lordheavym@gmail.com>

pkgname=glu
pkgver=9.0.2
pkgrel=1
pkgdesc="Mesa OpenGL Utility library"
arch=('x86_64')
url="https://cgit.freedesktop.org/mesa/glu/"
license=('LGPL')
depends=('libgl')
makedepends=('meson')
source=(https://mesa.freedesktop.org/archive/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
sha512sums=('2517d7406bb643d12c017a95dcb5d8716f307344332638bcbdf274a90752a7c22165d34745f1b082ed916bb07d40e62d1d1d67d96426225be63166f3480d6f64'
            'SKIP')
validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # "Matt Turner <mattst88@gmail.com>"

build() {
  arch-meson $pkgname-$pkgver build \
    -D default_library=shared

  # Print config
  meson configure build

  ninja -C build
  meson compile -C build
}

check() {
  ninja -C build test
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
